<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<script language="javascript">
        function addRow(tableID) {

            var table = document.getElementById(tableID);

            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);

            var cell1 = row.insertCell(0);
            var element1 = document.createElement("input");
            element1.type = "text";
            element1.name = "fecha" + rowCount;
            element1.style.width = "92%";
            cell1.appendChild(element1);

            var cell2 = row.insertCell(1);
            var element2 = document.createElement("input");
            element2.type = "text";
            element2.name = "paisDestino" + rowCount;
            element2.style.width = "92%";
            cell2.appendChild(element2);

            var cell3 = row.insertCell(2);
            var element3 = document.createElement("input");
            element3.type = "text";
            element3.name = "montoPais" + rowCount;
            element3.style.width = "92%";
            cell3.appendChild(element3);

            var cell4 = row.insertCell(3);
            var element4 = document.createElement("input");
           element4.type = "text";
          element4.name = "destinoFondos" + rowCount;
         element4.style.width = "92%";
            //            cell4.appendChild(element4);
           // var element4 = document.getElementById("destinos").cloneNode(true);
           // element4.name = "destinoFondos" + rowCount;
           // element4.style.width = "100%";
            cell4.appendChild(element4);

            var cell5 = row.insertCell(4);
           // var element5 = document.createElement("input");
            //element5.type = "text";
            //element5.name = "descripcion" + rowCount;
            //element5.style.width = "100%";
			
            var element5 = document.getElementById("consultores").cloneNode(true);
            element5.name = "9" + rowCount;
            element5.style.width = "92%";
            cell5.appendChild(element5);

            var cell6 = row.insertCell(5);
            var element6 = document.createElement("input");
            element6.type = "text";
            element6.name = "1" + rowCount;
            element6.style.width = "92%";
            cell6.appendChild(element6);
	
	
	   var cell7 = row.insertCell(6);
            var element7 = document.createElement("input");
            element7.type = "text";
            element7.name = "2" + rowCount;
            element7.style.width = "95%";
            cell7.appendChild(element7);
			
			 var cell8 = row.insertCell(7);
            var element8 = document.createElement("input");
            element8.type = "text";
            element8.name = "3" + rowCount;
            element8.style.width = "92%";
            cell8.appendChild(element8);
        }

        function deleteRow(tableID) {
            try {
                var table = document.getElementById(tableID);
                var rowCount = table.rows.length;

                for (var i = 0; i < rowCount; i++) {
                    var row = table.rows[i];
                    var chkbox = row.cells[0].childNodes[0];
                    if (null != chkbox && true == chkbox.checked) {
                        table.deleteRow(i);
                        rowCount--;
                        i--;
                    }

                }
            } catch (e) {
                alert(e);
            }
        }

    </script>


<script type="text/javascript">
$(function() {		
	$("#myTable").tablesorter({widgets: ['zebra']});
	$("button").button();
});	

$(document).ready(function() {
  $("button").button();
});

</script>

</script>
<table id="body" class="principal" width="1018" border="0" cellpadding="0" cellspacing="0"> 
<tr>
	<td align="left" style="background: url(Img/Menu/fondoBarraBotones.jpg)">
	

			
			
<script type="text/javascript" src="Scripts/SlideDownBoxMenu/jquery.easing.1.3.js"></script>

	</td>
</tr>
<tr><td><br></td></tr><tr><td><br></td></tr>
<tr>
	<td align="center" >
	
	<table>
							<tr align="left"><td width="900">Introduzca los datos a continuaciÛn:</td></tr>
							<tr><td><br></td></tr>
							</table>
	
	<table class="contenido" id="formulario" cellspacing="5" align="center">
                            <tbody>
                              <form name="datos" method="POST" action="/AccionAgregarIndicador">                              
                              
                              <tr>
                                  <td align="right" width="210">Proyecto: </td><td align="left" width="150"><select name="databases" style="width:220px">                                                        
                                      <option value="SQL Server 2005">Pemex EP</option> 
                                      <option value="SQL Server 2008">EGEP Consultores</option> 
                                      </td>
                              </tr>
							  
							 
							  
							  <tr>
                               <td align="right" width="210">Fecha de Documento: </td><td align="left" width="150"><input type="text" value="" name="Inicio" size="32"/></td><td align="left" width="25"><img src="Img/cal.gif" onclick="displayCalendar(document.forms[0].Inicio,'dd/mm/yyyy',this)" onmouseover="this.style.cursor='pointer'"></td><td width="155"></td>
                                
                              </tr>

                                  <tr>
                                      <td align="right" width="210">Comentarios: </td> <td align="left" bgcolor="#C8DAFB" width="210">
                                          <input type="text" name="description" size="36" title="Introduzca la descripcion del Indicador"/></td>
                                  </tr>
                              
                                  <tr>
                                      <td align="right" width="210">Concepto: </td> <td align="left" bgcolor="#C8DAFB" width="210">
                                          <input type="text" name="description" size="36" title="Introduzca la descripcion del Indicador"/></td>
                                  </tr>
                                  
                              <tr>
                                    <td align="right" width="210"></td><td align="right" width="210"></td>
                                    <td align="left" width="210"></td>
                                  </tr>
                                  </form>
                              </tbody>
                          </table>
						  
						  
						  
						  <table>
						  <tr>
							<td align="center">
							<div>
								<table id="myTable" class="tablesorter" align="center" border="0" cellpadding="0" cellspacing="1"> 
								<thead> 
								<tr>
                                    <th>
                                        Seleccione					
                                         </th> 
									<th>Cuenta de Mayor/Codigo SN</th> 
									<th>Cuenta de Mayor/Nombre SN</th> 
									<th>Debito</th> 
									<th>Credito</th> 
                                    <th>Concepto</th> 
									 
                                    
								</tr> 
								</thead> 
								<tbody> 
								
											<tr>
                                                
                                                
												<td align="center">
													<input type="checkbox" name="description"  style="width:90%"/></td> 						
												</td> 
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>							
												</td> 
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>	
                                                        
													</select>							
												</td>
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
                              <td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												
											</tr>
											
											<tr>
                                                <td align="center">
													<input type="checkbox" name="description"  style="width:90%"/></td> 						
												</td> 
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>							
												</td>  
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>								
												</td>
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
    <td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												
											</tr>
											
											<tr>
                                                <td align="center">
													<input type="checkbox" name="description"  style="width:90%"/></td> 						
												</td> 
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>								
												</td>
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>								
												</td>
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
                                                <td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												
											</tr>
											
											<tr>
                                                <td align="center">
													<input type="checkbox" name="description"  style="width:90%"/></td> 						
												</td> 
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>								
												</td>
												<td align="center">
													<select id ="consultores" name="databases" style="width:90%">                                                        
                                                        <option value="type"></option> 
                                                        
													</select>							
												</td>
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												<td align="center"><input type="text" name="description"  style="width:90%"/></td> 
                                                <td align="center"><input type="text" name="description"  style="width:90%"/></td> 
												
											</tr>
								
								</tbody> 
								</table> 
							</div>
							</td>
						</tr>
						  </table>
						  <input  type="button" value="AÒadir Fila" onclick="addRow('myTable')" />
                          <input  type="button" value="Eliminar Fila"  />    
    
						<table class="contenido" id="formulario" cellspacing="5" align="center">
                            <tbody>
						     <tr>
						  
                             
                               
                               
                              </tr>
                              
                                <tr>
                                
                                  </tr>

							</tbody>

		
	</td>
</tr>
<br></td></tr><tr><td><br></td></tr>		
</table>